/**
 * @author allen
 * @date 2019/9/5
 * @desc 对服务器进行配置
 */
package com.server.core.config;

import com.server.core.util.ActionUtil;
import com.server.core.util.FilterUtil;

/**
 * @desc 核心驱动配置类
 */

public class BasicConfig {

    private static int port = 8080;
    public static String path = "com/server/action";
    public static String packagePath = "com.server.action";
    public static void setPort(int port) {
        BasicConfig.port = port;
    }
    public static int getPort() {
        return port;
    }

    static {
        /**
         *  初始化action
         */
        ActionUtil.packageScan(path);
        ActionUtil.setActionMap();
        /**
         *  初始化filter
         */
        FilterUtil.packageScan(path);
        FilterUtil.setActionMap();
    }

}
